/******************************************************************************************
 * Import
 ******************************************************************************************/

// module
import Taro, { Component } from '@tarojs/taro'

// project
import { CPage, CContent, CHeader, CFooter, CFloat, CAround, CBetween, CCenter, CRow, CWrap, CLine, CHand, CItemX, CItemY, CText, CLabel, CSvg, CImage, CButton, CColumn } from '../../../library/comp';
import { Base64, Gen, Time, Zip, Session, Storage, Toast} from '../../../library/func';
import Http from '../../../project/func/http/http'
import "../../../library/style/patch.css"
import Icon from '../../../project/style/icon';

// 引用组件
/******************************************************************************************
 * Export Class
 ******************************************************************************************/

class IButtom extends Component {

	constructor(props) {
        super(props);
        this.state = {

        };

    }

    /*------------------------------------------------------------------------------------
	 * 自定义方法
	 *-----------------------------------------------------------------------------------*/

	/**
	 * 渲染
	 */
	render() {
        const iscollect = this.props.iscollect?true:false;

        // 渲染
		return (

                <CFooter>
            
                    <CAround bg="white"  h="45" bt="#eee solid 1">
                        <CBetween>
                            <CHand class="f1" h="45"  y="center" x="center">

                                {iscollect?
                                <CItemX x="center" y="center" onClick={ this.props.onCollect }>
                                    <CHand>
                                        <CSvg icon={Icon.collect} w='15' h='15' color="#D9C15F"></CSvg>
                                    </CHand>
                                    <CText ml="10" size="16">已收藏</CText>
                                </CItemX> 
                                :
                                <CItemX x="center" y="center" onClick={ this.props.onCollect }>
                                    <CHand>
                                        <CSvg icon={Icon.collect} color="#323232" w='15' h='15'></CSvg>
                                    </CHand>
                                    <CText ml="10" size="16">未收藏</CText>
                                </CItemX> 
                                }

                            </CHand>


                            <CHand class="f01" y="center" h="45" x="center" y="center">
                                <CHand w="1" h="20" bg="#eee"></CHand>
                            </CHand>


                            <button class="f1" plain style="border:none; " open-type="share" >
                            <CHand class="f1" y="center" h="45" x="center">
                                <CHand>
                                    <CSvg icon={Icon.sharetwo}  w='15' h='15'></CSvg>
                                </CHand>
                                <CText ml="10" size="16">转发</CText>
                            </CHand>
                            </button>



                        </CBetween>

                    </CAround>
                        
                

                </CFooter>




		);
	}

};